/*
 * Copyright 2011 Clean GWT
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
package com.cleangwt.showcase.client.page;

import com.cleangwt.bootstrap.client.style.Btn;
import com.cleangwt.bootstrap.client.ui.Carousel;
import com.cleangwt.page.client.PageContext.CodeSplit;
import com.cleangwt.page.client.PageContext.Page;
import com.cleangwt.page.client.PageContext.Prefetch;
import com.cleangwt.showcase.client.component.ShowcasePage;
import com.cleangwt.showcase.client.resource.PageGroups;
import com.cleangwt.user.client.ui.Button;

/**
 * 
 * @author Jess
 * @version 1.0
 * @since 1.0
 */
@Prefetch(PageGroups.RICH_WIDGET)
@CodeSplit
@Page
public class CarouselDemo extends ShowcasePage {

  public CarouselDemo() {
    super("The Carousel",
        "Refer to <a href='http://getbootstrap.com/javascript/#carousel'>Bootstrap</a>",
        "CarouselDemo.java");
    Carousel car = new Carousel();
    Button btn1 = new Button("Item1");
    Button btn2 = new Button("Item2");
    Button btn3 = new Button("Item3");
    Button btn4 = new Button("Item4");
    setContentWidget(car);

    btn1.setSize("100%", "320px");
    btn2.setSize("100%", "320px");
    btn3.setSize("100%", "320px");
    btn4.setSize("100%", "320px");

    car.addItem("<h4>Caption 1</h4> something about item1...", Btn.primary(btn1));
    car.addItem("<h4>Caption 2</h4> something about item2...", Btn.primary(btn2));
    car.addItem("<h4>Caption 3</h4> something about item3...", Btn.primary(btn3));
    car.addItem("<h4>Caption 4</h4> something about item4...", Btn.primary(btn4));
    car.setWidth("100%");
  }

}
